package com.ln.dm1103.demo02;

import java.util.function.Function;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/3 16:56
 */
public class TestFunction {
    public static void main(String[] args) {
        Function<String,Integer> function=f->f.length();

        fun(function,"nihaoshijie");
    }
    public static void fun(Function<String,Integer> function,String s){
        Integer apply = function.apply(s);
        System.out.println(apply);
    }
}
